package net.wicp.tams.common.spring.autoconfig.beans;

import java.lang.annotation.Annotation;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public abstract class TypeBean<T> implements InitializingBean, ApplicationContextAware {

	protected ApplicationContext applicationContext;

	protected final Annotation annotationInst;

	public TypeBean(Annotation annotationInst) {
		this.annotationInst = annotationInst;
	}

	private T ref;

	public T getRef() {
		return ref;
	}

	public void setRef(T ref) {
		this.ref = ref;
	}

	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		this.applicationContext = applicationContext;
	}

}
